package com.example.knowman.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.knowman.entity.knowCategory;
import com.example.knowman.service.IKnowCategoryService;
import com.example.knowman.service.IStaffListService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/StaffList")
public class StaffListController {
    private final IStaffListService iStaffListService;


    public StaffListController(IStaffListService iStaffListService) {

        this.iStaffListService = iStaffListService;
    }

    @GetMapping("getStaffName")
    public ResponseEntity<String> getStaffName(@RequestParam String staffCode) {

        String res = iStaffListService.getStaffName(staffCode);


        return ResponseEntity.ok(res);
    }
}
